//package com.ladlee.parking.config;
//
//import com.ladlee.parking.config.handler.CustomAuthenticationFailureHandler;
//import com.ladlee.parking.config.handler.CustomAuthenticationSuccessHandler;
//import com.ladlee.parking.properties.SecurityProperties;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//
///**
// * 登录认证相关配置
// */
//@Configuration
//public class FormAuthenticationConfiguration {
//
//    @Autowired
//    private SecurityProperties securityProperties;
//    @Autowired
//    private CustomAuthenticationSuccessHandler customAuthenticationSuccessHandler;
//    @Autowired
//    private CustomAuthenticationFailureHandler customAuthenticationFailureHandler;
//
//    public void configure(HttpSecurity http) throws Exception {
//        http.formLogin()
//                .loginPage(securityProperties.getLogin().getLoginPage())
//                .loginProcessingUrl(securityProperties.getLogin().getLoginUrl())
//                .successHandler(customAuthenticationSuccessHandler)
//                .failureHandler(customAuthenticationFailureHandler);
//    }
//
//
//}
